#include "widget.h"
#include "ui_widget.h"
#include <QString>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    mybutton = new QPushButton(this);
    mybutton->setText("按钮");
    mybutton->move(200,200);
    connect(mybutton,&QPushButton::clicked,this,&Widget::hands);
    connect(this,&Widget::mysignal,this,&Widget::test2);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::hands()
{
    emit mysignal("第一个按钮","第二个按钮");
}

void Widget::test2(QString s1, QString s2)
{
    mybutton->setText(s1);
    ui->pushButton->setText(s2);
}

void Widget::test1(QString)
{

}

void Widget::on_pushButton_clicked()
{

}
